def combination(n: int, k: int) -> int:
    if n == k:
        return 1
    elif k in [0, 1]:
        return n if k == 1 else 1
    else:
        return combination(n - 1, k) + combination(n - 1, k - 1)

if __name__ == "__main__":
    n = int(input("总数："))
    k = int(input("要组合的个数："))
    print("组合数为：%d"%combination(n, k))